/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 attack_angle.h

	$Header: /heroes4/attack_angle.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ATTACK_ANGLE_H_INCLUDED )
#define ATTACK_ANGLE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <vector>
#include "math_constants.h"
#include "map_point.h"

enum t_direction;

struct t_attack_angle
{
	int            attack_angle;
	t_map_point_2d point;
	int            attack_distance;
	int            move_distance;
};

inline bool operator < (t_attack_angle const& left, t_attack_angle const& right)
{
	if (left.attack_angle < right.attack_angle)
		return true;
	if (left.attack_angle > right.attack_angle)
		return false;
	if (left.point.row < right.point.row)
		return true;
	if (left.point.row > right.point.row)
		return false;
	return left.point.column < right.point.column;
}

class t_attack_angle_list : public std::vector<t_attack_angle>
{
public:
	t_attack_angle const* get_closest() const;
	t_attack_angle const* get_farthest() const;
};


#endif // ATTACK_ANGLE_H_INCLUDED